package com.launch.carmanager.task;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.launch.carmanager.R;
import com.launch.carmanager.data.model.TaskMultipleItem;
import com.launch.carmanager.data.model.TaskVolBean;

import java.util.List;

/**
 * Created by ganquan on 2019/3/29 17:28
 */
public class TaskAdapter extends BaseMultiItemQuickAdapter<TaskMultipleItem,BaseViewHolder> {


    /**
     * Same as QuickAdapter#QuickAdapter(Context,int) but with
     * some initialization data.
     *
     * @param data A new list is created out of this one to avoid mutable list
     */
    public TaskAdapter(List<TaskMultipleItem> data) {
        super(data);
        addItemType(TaskMultipleItem.TASKViolation, R.layout.item_task_volation);
        addItemType(TaskMultipleItem.TASKInstallDevice, R.layout.item_task_install_device);

    }

    @Override
    protected void convert(BaseViewHolder helper, TaskMultipleItem item) {
        switch (helper.getItemViewType()){
            case TaskMultipleItem.TASKViolation://违章
                break;
            case TaskMultipleItem.TASKInstallDevice://安装设备
                break;
        }
    }
}
